package com.ddwl.schema.vo.order;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.Instant;

/**
 * 订单商品表(OrderSpu)返回前端api对象
 *
 * @author makejava
 * @since 2020-06-02 11:21:27
 */
@Data
@ApiModel("")
public class OrderSpuApiVo {

    private String id;

    @ApiModelProperty("订单号")
    private String orderId;

    @ApiModelProperty("商品ID")
    private String itemId;

    @ApiModelProperty("skuid")
    private String skuId;
    @ApiModelProperty("sku编码")
    private String skuCode;
    @ApiModelProperty("主商品编码")
    private String itemCode;

    @ApiModelProperty("购买数量")
    private Integer skuQty;

    @ApiModelProperty("商品名称")
    private String itemName;

    @ApiModelProperty("商品描述")
    private String skuDesc;

    @ApiModelProperty("商品图片")
    private String skuPic;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("原单价")
    private BigDecimal price;

    @ApiModelProperty("实际付款单价")
    private BigDecimal realPrice;

    @ApiModelProperty("津贴抵扣价格")
    private BigDecimal subsidyPrice;
    
    @ApiModelProperty("津贴抵扣价格余数")
    private BigDecimal otherSubsidyPrice;

    @ApiModelProperty("创建时间")
    private Instant gmtCreated;

    @ApiModelProperty("修改时间")
    private Instant gmtModified;



    public void setSubsidyPrice(BigDecimal subsidyPrice) {
        this.subsidyPrice = subsidyPrice;
        if (this.subsidyPrice==null)this.subsidyPrice = new BigDecimal(0);
    }

    public void setOtherSubsidyPrice(BigDecimal otherSubsidyPrice) {
        this.otherSubsidyPrice = otherSubsidyPrice;
        if (this.otherSubsidyPrice==null)this.otherSubsidyPrice = new BigDecimal(0);
    }
}
